<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>华为注册页面</title>
		<script type="text/javascript" src="{{__PUBLIC__}}/Home/js/jquery-1.8.2.min.js"></script>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/register.css"/>
		<link rel="shortcut icon" href="{{__PUBLIC__}}/Home/images/favicon.ico">
		<script type="text/javascript" src="{{__PUBLIC__}}/Home/hdjs/hdjs.min.js"></script>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/hdjs/hdjs.css">
		<script type="text/javascript">
			$(function(){
			$('#check').validate({
				username:{
					rule:{
						required:true,
						email:true,
						ajax:{url:'{{U("Register/check")}}'}
					},
					error:{
						required:'注册邮箱不能为空',
						email:'邮箱不正确'
					},
					success: 'ok',
					message:'请输入注册邮箱'
				},
				password: {
		            rule: {
		                required: true,
		                minlen:6,
		            	maxlen:20
		            },
		            error: {
		                required: '密码不能为空',
		                minlen:'新密码不得少于8位',
		            	maxlen:'新密码不得多于32位'
		            }
		        },
		        confirmPassword: {
		            rule: {
		                required: true,
		                confirm: 'password'
		            },
		            error: {
		                required: '密码不能为空',
		                confirm: '两次密码不一致'
		            }
		        },
				code: {
		            rule: {
		                required: true,
		                ajax:{url:'{{U("Register/codeCheck")}}'}
		            },
		            error: {
		                required: '验证码不能为空',     
		            },
					success: 'ok'
		        },
			})
//				验证码获得验证码地址
			var src = $('.code-picture').attr('src');
			$('.code-picture').click(function(){
				//组合随机地址
				var newSrc = src +'&t='+ Math.random();
				//再把地址赋值给图片
				$(this).attr('src',newSrc);
			})
		})
		</script>
			<style type="text/css">
				*{
					margin: 0;
					padding: 0;
				}
			</style>
			
	</head>
	<body>
		<div class="header">
			<div class="head">
				<img src="{{__PUBLIC__}}/Home/images/logo2.png"/>
				<img class="line1" src="{{__PUBLIC__}}/Home/images/split1.png"/>
				<p>华为商城</p>
			</div>
		</div>
		<div class="hr-30"></div>
		<div class="table-form">
			<p>注册华为帐号</p>
			<div class="table1">
				<form  method="post" id="check" action="">
					<table border="" cellspacing="" cellpadding="">
						<tr>
							<th>邮箱：</th>
							<td><input type="text" name="username" placeholder="5~50个字符"/><span id="hd_username"></span></td>
						</tr>
						<tr>
							<th>密码：</th>
							<td class="pwd">
								<input type="password" name="password" id="" placeholder="8~32个字符" /><span id="hd_password"></span>
								<div class="pwd-check">
									<span>弱</span>
									<span>中</span>
									<span>强</span>
								</div>
							</td>
						</tr>
						
						<tr>
							<th>确认密码：</th>
							<td><input type="password" name="confirmPassword" placeholder="请重复输入您的密码" /><span id="hd_confirmPassword"></span></td>
						</tr>
						<tr>
							<th>验证码：</th>
							<td class="code"><input class="code-in" type="text" name="code" id="" placeholder="不区分大小写"/><span id="hd_code"></span></td>							
						</tr>
						<tr>
							<th></th>
							<td>
								<input type="checkbox" name="agree" id="" value="1" checked='checked' class="check-go" />
								<span class="code-police">同意</span>&nbsp;<a  class="code-police" href="">《华为账号服务条款、华为隐私政策》</a>
							</td>
						</tr>
						<tr>
							<th></th>
							<td><input type="submit" class="sub-go"  value="立即注册"/></td>
						</tr>
					</table>
					<img class="code-picture" src="{{U('Register/code')}}"/>
					
				</form>
			
			</div>
			<img class="cloud" src="{{__PUBLIC__}}/Home/images/bg14.png"/>
		</div>
		<img class="f-pic" src="{{__PUBLIC__}}/Home/images/bg26.png"/>
		<div class="f-tar">
			<span>已有华为账号</span>
			<a href="{{U('Login/index')}}"><input type="button" name="" id="" value="登录" /></a>
		</div>
			<!--foot-->
		<div class="hr-30"></div>
		<div class="hr-30"></div>
		<div class="custom-footer">
			<p><a href=""> 《华为帐号服务条款、华为隐私政策》</a> | <a href="">常见问题？ </a></p>
			<p>Copyright © 2011-2015  华为软件技术有限公司  版权所有  保留一切权利  苏B2-20070200号 | 苏ICP备09062682号-9</p>
		</div>
		
		
		
		
		
	</body>
</html>
